package com.study.talk.data.model;

import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.Ignore;
import androidx.room.PrimaryKey;

@Entity(tableName = "chat_cache")
public class ChatCache {

    @PrimaryKey(autoGenerate = true)
    @ColumnInfo(name = "id")
    private Integer id;
    @ColumnInfo(name = "name")
    private String name;
    @ColumnInfo(name = "avatar")
    private String avatar;
    @ColumnInfo(name = "last_time")
    private String lastContent;
    @ColumnInfo(name = "chat_type")
    private Integer chatType;
    @ColumnInfo(name = "status")
    private Boolean status;
    @ColumnInfo(name = "user_id")
    private Integer userId;
    @ColumnInfo(name = "group_id")
    private Integer groupId;
    @ColumnInfo(name = "create_time")
    private String createTime;

    public ChatCache() {
    }

    @Ignore
    public ChatCache(String createTime, String avatar, String lastContent, Integer chatType, Boolean status, Integer userId, Integer groupId) {
        this.createTime = createTime;
        this.avatar = avatar;
        this.lastContent = lastContent;
        this.chatType = chatType;
        this.status = status;
        this.userId = userId;
        this.groupId = groupId;
    }


    @Ignore
    public ChatCache(String createTime, String name, String avatar, String lastContent, Integer chatType, Boolean status, Integer userId, Integer groupId) {
        this.createTime = createTime;
        this.name = name;
        this.avatar = avatar;
        this.lastContent = lastContent;
        this.chatType = chatType;
        this.status = status;
        this.userId = userId;
        this.groupId = groupId;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getLastContent() {
        return lastContent;
    }

    public void setLastContent(String lastContent) {
        this.lastContent = lastContent;
    }

    public Integer getChatType() {
        return chatType;
    }

    public void setChatType(Integer chatType) {
        this.chatType = chatType;
    }

    public Boolean getStatus() {
        return status;
    }

    public void setStatus(Boolean status) {
        this.status = status;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getGroupId() {
        return groupId;
    }

    public void setGroupId(Integer groupId) {
        this.groupId = groupId;
    }
}
